<?php

namespace App\Http\Requests\Logic\Consociation;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\Auth;

class QueryCollection extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
	 * 定义表单规则
	 *
	 * Date: 12/04/2018
	 * @author George
	 * @return array
	 */
    public function rules()
    {
        return [
        	'initiator' => 'nullable',
			'project_id' => 'nullable',
			'paginate' => 'nullable',
            'status' => [
                'required',
                Rule::in(array_keys(config('system.consociation.status')))
            ],
        ];
    }

    /**
     * 定义表单验证错误消息
     *
     * Date: 11/04/2018
     * @author George
     * @return array
     */
    public function messages()
    {
        return [
            'status.required' => '请勿修改参数',
            'status.in' => '请勿修改参数',
        ];
    }
}
